CommandInsertEnvObj Class Reference

#include <CommandInsertEnvObj.h>

Inheritance diagram for CommandInsertEnvObj:

Command List of all members.

Public Member Functions

 CommandInsertEnvObj (osg::Vec3 pos, OSGWindows *osgwind, string pathname, float scale)
bool execute ()
bool unexecute ()

Private Attributes

OSGWindows * osgwind_
EnvironmentObject * envObj
vector< TraffEduObject * > insertedObjs_

Detailed Description

Definition at line 8 of file CommandInsertEnvObj.h.


Constructor & Destructor Documentation

CommandInsertEnvObj::CommandInsertEnvObj (  osg::Vec3  pos,
OSGWindows *  osgwind,
string  pathname,
float  scale
) 
 

A constructor. Initializes osgwind_ and creates a new environmental object by using the parameter of pathname.

Parameters:
pos a osg::Vec3 variable.
osgwind an OSGWindows pointer.
pathname a string argument.
scale a float argument.

Definition at line 2 of file CommandInsertEnvObj.cpp.

References OSGWindows::addObject(), envObj, TraffEduObject::getObjectGroup(), insertedObjs_, osgwind, osgwind_, and TraffEduObject::setPosition().


Member Function Documentation

bool CommandInsertEnvObj::execute (   )  [virtual]
 

do the insertion of environmental object operation.

Returns:
Operation success

Implements Command.

Definition at line 16 of file CommandInsertEnvObj.cpp.

References OSGWindows::doAddGeode(), envObj, and osgwind_.

bool CommandInsertEnvObj::unexecute (   )  [virtual]
 

undo the insertion of environmental object operation.

Returns:
Operation success

Implements Command.

Definition at line 24 of file CommandInsertEnvObj.cpp.

References OSGWindows::doDeleteGeode(), envObj, and osgwind_.


Member Data Documentation

EnvironmentObject* CommandInsertEnvObj::envObj [private]
 

a private variable. It is used to hold the created environmental object.

Definition at line 22 of file CommandInsertEnvObj.h.

Referenced by CommandInsertEnvObj(), execute(), and unexecute().

vector<TraffEduObject*> CommandInsertEnvObj::insertedObjs_ [private]
 

a private vector of TraffEduObjects. It holds the inserted environmental objects.

Definition at line 28 of file CommandInsertEnvObj.h.

Referenced by CommandInsertEnvObj().

OSGWindows* CommandInsertEnvObj::osgwind_ [private]
 

a private variable. It is initialized with the unique OSGWindows instance.

Definition at line 16 of file CommandInsertEnvObj.h.

Referenced by CommandInsertEnvObj(), execute(), and unexecute().


The documentation for this class was generated from the following files:
Generated on Sun May 28 18:54:12 2006 for TraffEdu by  doxygen 1.4.6-NO